/*
 * @Descripttion:
 * @version:
 * @Author: sueRimn
 * @Date: 2020-10-21 18:10:42
 * @LastEditors: sueRimn
 * @LastEditTime: 2020-11-14 16:59:03
 * 文档地址：http://lz.25002.cn/msmcenter_api/index.php
 */
import request from '@/utils/request'
import store from '@/store/index'
const base = require('../../env/index')

// 夹带k_token
function addK_Token(data) {
    var token = {
        k_token: store.getters.k_token
    }
    Object.assign(data, token)
    return data
}
/**
 *添加/编辑教室
 */
export function createClassRoom(data) {
    return request({
        url: base.classmanagement_url + '/api/v1/admin/classroom/save',
        method: 'POST',
        headers: {},
        data: addK_Token(data)
    })
}

/**
 * 查询教室列表
 */
export function searchClassRoom(data) {
    return request({
        url: base.classmanagement_url + '/api/v1/admin/classroom/infos',
        method: 'POST',
        headers: {},
        data: addK_Token(data)
    })
}

// 查看教室当前行信息
export function getClassRoomMessage1(data) {
    return request({
        url: base.classmanagement_url + '/api/v1/admin/classroom/info/' + data.unid,
        method: 'POST',
        headers: {},
        data: addK_Token(data)
    })
}
